﻿using System.Collections;
using System.Collections.Generic;
using Dict.DataModel;
using Dict;

public class DictPetTalentBlo  {

    //获取随机属性加成信息
    public static List<string> GetPropInfo(List<string> attrID,int talentLevel)
    {
        List<TablePetTalent> curTalents = new List<TablePetTalent>();
        List<TablePetTalent>infos = DictDataManager.Instance.tablePetTalentDao.CacheList;
        foreach(TablePetTalent table in infos)
        {
            if (table.talentLevel == talentLevel)
                curTalents.Add(table);
        }
        if (curTalents.Count <= 0) return null;
        List<string> attrs = new List<string>();
        foreach(TablePetTalent table in curTalents)
        {
            foreach(string id in attrID)
            {
                if (table.petTalentId.Equals(id))
                    attrs.Add(table.talent);
            }
        }
        return attrs;
    }
}
